/* eslint-disable @typescript-eslint/no-wrapper-object-types */
import { createLogger } from "@/utils/logger"
import Apis from "."

const logger = createLogger("ApiUtils")

const ApiUtils = {
    async getFormattedBrandAssets(tag: ApiTypes.Fetcher.Result.BrandAssetTypes.TagKey | String) {
        type Output = Record<
            ApiTypes.Fetcher.Result.BrandAssetTypes.AtomKey,
            ApiTypes.Fetcher.Result.BrandAssetTypes.Atom<
                "imageCarousel" | "gameSections" | "gameMenus"
            >
        >
        const url = `/api/v1/ui-content?tag=${tag}`
        const response = await Apis.v1.getBrandAssets({
            tag: tag as string,
        })
        const data = response.data.data as Output
        return data
    },
}

export default ApiUtils
